var API = {
       baseUrl: 'http://114.80.111.137:8041',
//  baseUrl: 'http://i.goodo.com.cn:8039',
//  baseUrl: 'http://localhost',
	 // baseUrl: 'http://www.zhongxinduan.com',
       RbaseUrl: 'http://www.zhongxinduan.com'
};

// $(function () {
//     var resize = function() {
//         var hs =  $(window).height() / $(document).height();
//         var ws =  $(window).width() / $(document).width();

// //      console.log($(document).width())
// //      console.log($(window).width())

//         // $("body").css({
//         //   "width": $(window).width() + "px"
//         // })

//        window.scaleRatio = {
//          hs: hs,
//          wh: ws
//        }

//         $(".container-fluid").css({
//             "-webkit-transform": "scale(" + ws + "," + hs + ")",
//             "transform": "scale(" + ws + "," + hs + ")",
//             "transform-origin": "left top",
//             "-webkit-transform-origin": "left top"
//         });

//     };






//     resize();
//     // console.log($(".right"));
//     $(window).resize(resize);



// });
(function() {
  var documentWidth = null, documentHeight = null;

  window.addEventListener("resize", resizeThrottler, false);

  var resizeTimeout;
  function resizeThrottler() {
    // ignore resize events as long as an actualResizeHandler execution is in the queue
    if ( !resizeTimeout ) {
      resizeTimeout = setTimeout(function() {
        resizeTimeout = null;
        actualResizeHandler();

       // The actualResizeHandler will execute at a rate of 15fps
       }, 66);
    }
  }

  function actualResizeHandler() {
    if (documentWidth === null) documentWidth = $(document).width();
    if (documentHeight === null) documentHeight = $(document).height();

    // handle the resize event
    var hs =  $(window).height() / documentHeight;
    var ws =  $(window).width() / documentWidth;


    window.scaleRatio = {
      hs: hs,
      wh: ws
    };

    // alert($(window).width() + "x" + $(window).height() + " " + $(document).width() + "x" + $(document).height());
    // alert(hs + " " + ws + " ");

    $("body").css({
       "-webkit-transform": "scale(" + ws + "," + hs + ")",
       "transform": "scale(" + ws + "," + hs + ")",
       "transform-origin": "left top",
       "-webkit-transform-origin": "left top"
    });
  }

  actualResizeHandler();
  // 将 layer.msg的位置都调至中间
  var fake = layer.msg;
  layer.msg = function (title, option, fn) {
    $('body').css('pointer-events', 'none');
    fake(title, $.extend(option, {
      offset: [$('.container-fluid').height() / 2, $('.container-fluid').width() / 2]
    }), function(){
      $('body').css('pointer-events', 'all');
      fn && fn();
    })
  }

  // 捕获全局错误

//   windowonerror = function(message, source, lineno, colno, error) {
//     var str = '';
//     str += 'Errormessage: ' + message + '\n';
//     str += 'source: ' + source + '\n';
//     str += 'lineno: ' + lineno + '\n';
//     str += 'colno: ' + colno + '\n';
//     str += 'error: ' + error + '\n';
//     alert(str);
//   }
    
//   window.onerror = windowonerror;


})();



//$(".footer").find("ul").find("a").eq(2).find("span").css("display","block");

$(function() {
          $(".footer").find("ul").find("li").each(function() {
                $(this).click(function() {

                    if($(this).index()!=2){
                    	alert('即将上线，敬请期待');
                    }
                })
            })

        })
